﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace AI.FSM
{
	/// <summary>
    /// 到达目标，即目标进入攻击范围
    /// </summary>
	public class ReachTargetTrigger : FSMTrigger {
        public override bool HandleTrigger(FSMBase fsm)
        {
            //目标在攻击范围内 返回true
            return (fsm.targetTF != null) ? fsm.InAttackRange() : false;
        }

        public override void Init()
        {
            TriggerID = FSMTriggerID.ReachTarget;
        }
    }
}

